package com.sxd.service;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/*@SpringBootApplication
@EnableDiscoveryClient // 开启Eureka客户端*/
@SpringCloudApplication
@EnableFeignClients // 开启feign客户端
public class SxdServiceConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SxdServiceConsumerApplication.class, args);
    }
    /*@Bean
    @LoadBalanced
    public RestTemplate restTemplate() {//feign已经自动集成了Ribbon负载均衡的RestTemplate。所以，此处不需要再注册RestTemplate。
        return new RestTemplate();
    }*/
}
